home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 1998 November / maximum-cd-1998-11.iso / Truespace 4 / Data / PROGRAM / PROCSETS / set035 < prev    next >
Encoding:
Text File  |  1998-08-27  |  23.4 KB  |  1,306 lines

  1. %%BeginResource: procset AGM_Gradient 1.0 0
  2. %%Title: (AGM Gradient Procset)
  3. %%Version: 1.0 0
  4. %%CreationDate: (4/26/96) ()
  5. %%Copyright: ((C) 1987-1996 Adobe Systems Incorporated All Rights Reserved)
  6. userdict /defaultpacking currentpacking put true setpacking
  7. userdict /AGM_Gradient 20 dict dup begin put
  8. /AGM_Gradient_private 200 dict def
  9. /initialize
  10. {
  11.     AGM_Gradient begin
  12.     AGM_Gradient_private begin
  13.     initializeVars
  14.  
  15.     /bd systemdict/mark get def
  16.     /ed
  17.         _level2PS
  18.         {
  19.             (>>)
  20.         }{
  21.             (counttomark 2 idiv dup dict begin {def} repeat pop currentdict end)
  22.         } ifelse
  23.     cvx def
  24.  
  25.     _level2PS{
  26.         initializeLev2
  27.     }{
  28.         initializeLev1
  29.     }ifelse
  30.  
  31.     queryDevice
  32.  
  33.     initializeRectFill
  34.     initializeShading
  35.     initializeOps
  36.     _producingSeps{
  37.         AGM_Gradient_Sep/initialize get exec
  38.     }{
  39.         initializeComposite
  40.     }ifelse
  41.     _illustrator{
  42.         /f{}def
  43.         /F{}def
  44.         /s{}def
  45.         /S{}def
  46.         /b{}def
  47.         /B{}def
  48.     }if
  49.     /image where{
  50.         /image get /_image xd
  51.     }if
  52.     /colorimage where{
  53.         /colorimage get /_colorimage xd
  54.     }if
  55.     AGM_Gradient_private
  56.     {
  57.         dup xcheck 1 index type /arraytype eq and
  58.         {
  59.             bind
  60.         }if
  61.         pop pop
  62.     }forall
  63.     AGM_Gradient
  64.     {
  65.         dup xcheck 1 index type /arraytype eq and
  66.         {
  67.             bind
  68.         }if
  69.         pop pop
  70.     }forall
  71.  end
  72.  
  73.     currentdict readonly pop
  74.  end
  75. }def
  76. /initializeAI
  77. {
  78.     pop pop
  79.     AGM_Gradient/AGM_Gradient_private get /_illustrator true put
  80.     AGM_Gradient/initialize get exec
  81.         AGM_Gradient begin
  82. }def
  83. /unload{
  84.     systemdict/languagelevel known{
  85.         systemdict/languagelevel get 2 ge{
  86.             userdict/AGM_Gradient_Sep 2 copy known{
  87.                 undef
  88.             }{
  89.                 pop pop
  90.             }ifelse
  91.             userdict/AGM_Gradient 2 copy known{
  92.                 undef
  93.             }{
  94.                 pop pop
  95.             }ifelse
  96.         }if
  97.     }if
  98. }def
  99. /terminate{
  100.     currentdict AGM_Gradient eq{
  101.      end
  102.     }if
  103. }def
  104.  
  105. AGM_Gradient_private begin
  106. /initializeVars{
  107.     /_d255 256 array def
  108.     0 1 255{
  109.         _d255 exch dup 255 div put
  110.     }bind for
  111.     /_d255- 256 array def
  112.     0 1 255{
  113.         _d255- exch 1 _d255 2 index get sub put
  114.     }bind for
  115.     /_sSave nd
  116.     /_dUserSpace matrix defaultmatrix def
  117.     /_bUMatrix matrix def
  118.     /_imageMatrix matrix def
  119.     /_saveMatrix matrix def
  120.     /_xm matrix def
  121.     /_ccAry1 5 array def
  122.     /_level2PS
  123.         systemdict/languagelevel known dup{
  124.             pop systemdict/languagelevel get 2 ge
  125.         }if
  126.     def
  127.     /_level3PS
  128.         _level2PS systemdict/shfill known and
  129.     def
  130.     currentdict /_illustrator known not{
  131.         /_illustrator false def
  132.     }if
  133.  
  134. }def
  135. /initializeOps
  136. {
  137.     AGM_Gradient begin
  138.     currentdict/Bc known not{
  139.         /Bc{
  140.  
  141.             _renderFlag 2 eq _enabledSmoothShade or{
  142.                 6 npop
  143.             }{
  144.                 pushBSpace
  145.                 _rampIndex 0 eq{
  146.                     pop pop
  147.                     setCStop
  148.                 }if
  149.                 linealFill
  150.                 popBSpace
  151.             }ifelse
  152.  
  153.         }def
  154.     }if
  155.  
  156.     currentdict/Bg known not{
  157.         /Bg{
  158.             10 npop
  159.             /_gradName xp
  160.             /_renderFlag xp
  161.             /_enabledSmoothShade false pt
  162.  
  163.             _renderFlag 2 ne{
  164.  
  165.                 _illustrator{
  166.                     _of setoverprint
  167.                 }if
  168.  
  169.                 /_enabledSmoothShade
  170.                     _level3PS{
  171.                         _usingSmoothShade
  172.                         _producingSeps not
  173.                         _inRipSep currentoverprint not and or and
  174.                     }{
  175.                         false
  176.                     }ifelse
  177.                 pt
  178.  
  179.                 _illustrator _eo and _renderFlag 3 eq or{
  180.                     eoclip
  181.                 }{
  182.                     clip
  183.                 }ifelse
  184.  
  185.                 _gradNames _gradName 2 copy known{
  186.                     get
  187.                     mark exch aload pop
  188.                     /_gradType xp
  189.                     1 sub dup /_rampIndex xp
  190.                     /_maxRampIndex xp
  191.                     mark exch aload pop
  192.                     0 0
  193.                 }if
  194.                 pop pop
  195.                 getRampData
  196.             }{
  197.                 mark mark
  198.             }ifelse
  199.         }def
  200.     }if
  201.  
  202.     currentdict/Bm known not{
  203.         /Bm{
  204.             _renderFlag 2 ne{
  205.                 _gradType 0 eq{
  206.                     linealRamp
  207.                 }{
  208.                     radialGrad
  209.                 }ifelse
  210.             }{
  211.                 6 npop
  212.             }ifelse
  213.         }def
  214.     }if
  215.  
  216.     currentdict/Bh known not{
  217.         /Bh{
  218.             2 npop
  219.             /_yHi xp
  220.             /_xHi xp
  221.             /_radHilite _xHi 0 ne _yHi 0 ne or pt
  222.         }def
  223.     }if
  224.  
  225.     currentdict/Bn known not{
  226.         /Bn{
  227.             AGM_Gradient_private begin
  228.                 dict /_gradNames xp
  229.          end
  230.         }def
  231.     }if
  232.  
  233.     currentdict/Bd known not{
  234.         /Bd{
  235.             AGM_Gradient begin
  236.             AGM_Gradient_private begin
  237.                 /_nColorsBd xp
  238.                 /_gradType xp
  239.                 /_gradName xp
  240.         }def
  241.     }if
  242.  
  243.     currentdict/BD known not{
  244.         /BD{
  245.                 currentdict/_gradNames known not{
  246.                     /_gradNames 20 dict def
  247.                 }if
  248.                 ] _nColorsBd _gradType
  249.                 ]  _gradName exch /_gradNames xput
  250.          end
  251.          end
  252.         }def
  253.     }if
  254.  
  255.     currentdict/Bb known not{
  256.         /Bb{
  257.  
  258.             AGM_Gradient/AGM_Gradient_private get /_illustrator get not{
  259.                 AGM_Gradient begin
  260.             }if
  261.             AGM_Gradient_private begin
  262.             _producingSeps{
  263.                 AGM_Gradient_Sep/AGM_Gradient_Sep_private get begin
  264.             }if
  265.             mySave
  266.         }def
  267.     }if
  268.  
  269.     currentdict/BB known not{
  270.         /BB{
  271.  
  272.             /_tmp xp
  273.             cleartomark cleartomark
  274.  
  275.             _tmp dup
  276.             _renderFlag
  277.  
  278.             myRestore
  279.  
  280.             _producingSeps{
  281.              end
  282.             }if
  283.  
  284.             _illustrator dup
  285.          end
  286.             not {
  287.              end
  288.             }if
  289.  
  290.             {
  291.                 2 ne exch 0 gt and{
  292.                     2 eq{
  293.                         s
  294.                     }{
  295.                         S
  296.                     }ifelse
  297.                 }{
  298.                     pop newpath
  299.                 }ifelse
  300.             }{
  301.                 pop newpath
  302.             }ifelse
  303.  
  304.  
  305.         }def
  306.     }if
  307.  
  308.     currentdict/Xm known not{
  309.         /Xm{
  310.             _xm astore pop
  311.         }def
  312.     }if
  313.  
  314.  end
  315. }def
  316. /queryDevice{
  317.     /_inRipSep
  318.         _level2PS{
  319.             currentpagedevice/Separations 2 copy known{
  320.                 get
  321.             }{
  322.                 pop pop false
  323.             }ifelse
  324.         }{
  325.             false
  326.         }ifelse
  327.     def
  328.     /_noImage /lv1Fix where{
  329.         pop lv1Fix
  330.     }{
  331.         false
  332.     }ifelse
  333.     def
  334.     /_useShells where{
  335.         pop
  336.     }{
  337.         /_useShells false def
  338.     }ifelse
  339.  
  340.     /_useSmoothShade where{
  341.         pop
  342.     }{
  343.         /_useSmoothShade false def
  344.     }ifelse
  345.     /_cyanPlate 1 0 0 0 testCMYKColorThrough def
  346.     /_magentaPlate 0 1 0 0 testCMYKColorThrough def
  347.     /_yellowPlate 0 0 1 0 testCMYKColorThrough def
  348.     /_blackPlate 0 0 0 1 testCMYKColorThrough def
  349.     /_compositeJob
  350.         _cyanPlate _magentaPlate and _yellowPlate and _blackPlate and
  351.     def
  352.     /_compositeSpotDevice where{
  353.         pop
  354.     }{
  355.         /_compositeSpotDevice _compositeJob not _inRipSep or{
  356.             1
  357.         }{
  358.             0
  359.         }ifelse
  360.         def
  361.     }ifelse
  362.     /_producingSeps _compositeSpotDevice 0 ne def
  363.     /_deviceDPI 72 0 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt def
  364.     /_dpiThreshold where{
  365.         pop
  366.     }{
  367.         /_dpiThreshold 600 def
  368.     }ifelse
  369.     /_screenFreqThreshold where{
  370.         pop
  371.     }{
  372.         /_screenFreqThreshold 150 def
  373.     }ifelse
  374.     /_contoneDevice where{
  375.         pop
  376.     }{
  377.         /_contoneDevice false def
  378.     }ifelse
  379.     /_subSampleOK
  380.         _deviceDPI _dpiThreshold le
  381.         currentScreenFreq _screenFreqThreshold le and
  382.         _contoneDevice not and
  383.     def
  384. }def
  385. /initializeRectFill{
  386.     /rectfill where dup{
  387.         exch pop not _producingSeps or
  388.     }{
  389.         not
  390.     }ifelse
  391.     {
  392.         /rectfill{
  393.             gsave
  394.             newpath
  395.             4 2 roll moveto
  396.             1 index 0 rlineto
  397.             0 1 index rlineto
  398.             1 index neg 0 rlineto
  399.             pop pop
  400.             closepath
  401.             fill
  402.             grestore
  403.         }def
  404.     }if
  405. }def
  406. /initializeLev1{
  407.     /currentoverprint where{
  408.         pop
  409.     }{
  410.         /currentoverprint {
  411.             false
  412.         }def
  413.     }ifelse
  414.     /currentScreenFreq{
  415.         currentscreen pop pop
  416.     }def
  417.     /_byte 1 string def
  418.     /colorimage where{
  419.         pop
  420.     }{
  421.         /colorimage{
  422.             pop pop
  423.             /_blackTmp xp
  424.             /_yellowTmp xp
  425.             /_magentaTmp xp
  426.             /_cyanTmp xp
  427.             /_cnt 0 pt
  428.             [
  429.             _byte dup 0
  430.             _cyanTmp
  431.                 /_cnt cvx /get cvx _d255 /exch cvx /get cvx .3 /mul cvx
  432.             _magentaTmp
  433.                 /_cnt cvx /get cvx _d255 /exch cvx /get cvx .59 /mul cvx
  434.             _yellowTmp
  435.                 /_cnt cvx /get cvx _d255 /exch cvx /get cvx .11 /mul cvx
  436.             _blackTmp
  437.                 /_cnt cvx /get cvx _d255 /exch cvx /get cvx
  438.             /add cvx /add cvx /add cvx 1 /exch cvx /sub cvx
  439.             /dup cvx 0 /lt cvx{
  440.                 pop 0
  441.             }/if cvx
  442.             /dup cvx 1 /gt cvx{
  443.                 pop 1
  444.             }/if cvx
  445.             255 /mul cvx /cvi cvx
  446.             256 /mod cvx
  447.             /dup cvx 0 /lt cvx{
  448.                 pop 0
  449.             }/if cvx
  450.             /put cvx
  451.             /_cnt dup cvx 1 /add cvx /pt cvx
  452.             ] cvx
  453.             bind
  454.             /_image load 5 execImage
  455.         }def
  456.     }ifelse
  457. }def
  458. /initializeLev2{
  459.     /level2ScreenFreq{
  460.      begin
  461.         60
  462.         HalftoneType 1 eq{
  463.             pop Frequency
  464.         }if
  465.         HalftoneType 2 eq{
  466.             pop GrayFrequency
  467.         }if
  468.         HalftoneType 5 eq{
  469.             pop Default level2ScreenFreq
  470.         }if
  471.          end
  472.     }def
  473.     /currentScreenFreq{
  474.         currenthalftone level2ScreenFreq
  475.     }def
  476. }def
  477. /initializeShading{
  478.     _useSmoothShade _level3PS and{
  479.         /_usingSmoothShade true pt
  480.         initializeLev3_Ops
  481.     }{
  482.         /_usingSmoothShade false pt
  483.     }ifelse
  484. }def
  485. /initializeLev3_Ops
  486. {
  487.     /initShFill{
  488.         /_index _gradType 0 eq {0}{_maxRampIndex 1 sub} ifelse pt
  489.         /_rampFuncsArray _maxRampIndex array pt
  490.         /_boundsArray _maxRampIndex 1 sub array pt
  491.         /_encodeArray _maxRampIndex 2 mul array pt
  492.         /_beginCoord _rampPoint pt
  493.         /_colorSpace null pt
  494.         /_firstFill _rampIndex _maxRampIndex eq pt
  495.         /_lastFill false pt
  496.     }def
  497.     /linealShFill{
  498.         popBSpace
  499.         _xm aload pop pushBSpace
  500.  
  501.         /_size _index 1 add pt
  502.         _size _maxRampIndex lt {
  503.             /_rampFuncsArray _rampFuncsArray 0 _size getinterval pt
  504.             /_boundsArray _boundsArray 0 _size 1 sub getinterval pt
  505.             /_encodeArray _encodeArray 0 _size 2 mul getinterval pt
  506.         }if
  507.  
  508.         bd
  509.             /ShadingType 2
  510.             /ColorSpace _colorSpace
  511.             /Function
  512.                 bd
  513.                     /FunctionType 3
  514.                     /Domain [0 1]
  515.                     /Functions _rampFuncsArray
  516.                     /Bounds _boundsArray
  517.                     /Encode _encodeArray
  518.                 ed
  519.             /Extend [_firstFill _lastFill]
  520.             /Domain [0 1]
  521.             /Coords [_beginCoord 0 _endCoord 0]
  522.         ed
  523.         shfill
  524.     }def
  525.  
  526.     /radialShFill{
  527.         /_size _maxRampIndex _index sub pt
  528.         _size _maxRampIndex lt {
  529.             /_rampFuncsArray _rampFuncsArray _index _size getinterval pt
  530.             /_boundsArray _boundsArray _index _size 1 sub getinterval pt
  531.             /_encodeArray _encodeArray _index 2 mul _size 2 mul getinterval pt
  532.         }if
  533.  
  534.         /_rampLen _beginCoord _endCoord sub pt
  535.         bd
  536.             /ShadingType 3
  537.             /ColorSpace _colorSpace
  538.             /Function
  539.                 bd
  540.                     /FunctionType 3
  541.                     /Domain [0 1]
  542.                     /Functions _rampFuncsArray
  543.                     /Bounds _boundsArray
  544.                     /Encode _encodeArray
  545.                 ed
  546.             /Extend [_lastFill _firstFill]
  547.             /Domain [0 1]
  548.             /Coords [_xHi _rampLen mul _yHi _rampLen mul _endCoord 0 0 _beginCoord]
  549.         ed
  550.         shfill
  551.  
  552.         _radHilite{
  553.             _xHi _rampLen mul _yHi _rampLen mul translate
  554.         }if
  555.     }def
  556.  
  557.     /fillRamp{
  558.  
  559.  
  560.         /_invert _midPoint 0.5 lt pt
  561.         _rampIndex _maxRampIndex eq {
  562.             initShFill
  563.         }if
  564.  
  565.         getRampColorSpace
  566.  
  567.         _colorSpace null eq{
  568.             /_colorSpace _rampColorSpace pt
  569.         }{
  570.             _colorSpace _rampColorSpace ne{
  571.                 /_index _index 1
  572.                 _gradType 0 eq{
  573.                     sub pt
  574.                     linealShFill
  575.                 }{
  576.                     add pt
  577.                     radialShFill
  578.                 }ifelse
  579.                 initShFill
  580.                 /_colorSpace _rampColorSpace pt
  581.             } if
  582.         }ifelse
  583.         /_endCoord _endPoint pt
  584.         _rampFuncsArray _index
  585.         bd
  586.             /FunctionType 2
  587.             /Domain [0 1]
  588.             /N 0.5 log _invert{1 _midPoint sub}{_midPoint}ifelse log div
  589.             _gradType 0 eq{
  590.                 _invert{/C1}{/C0}ifelse _C0
  591.                 _invert{/C0}{/C1}ifelse _C1
  592.             }{
  593.                 _invert{/C0}{/C1}ifelse _C1
  594.                 _invert{/C1}{/C0}ifelse _C0
  595.             }ifelse
  596.         ed
  597.         put
  598.  
  599.         _rampIndex 1 ne{
  600.             _boundsArray _index _gradType 1 eq{1 sub}if _endCoord put
  601.         } if
  602.  
  603.         0 1 _invert {exch}if
  604.         _encodeArray _index 2 mul 1 add 3 -1 roll put
  605.         _encodeArray _index 2 mul 3 -1 roll put
  606.         _rampIndex 1 eq {
  607.             /_lastFill true pt
  608.             _gradType 0 eq{
  609.                 linealShFill
  610.             }{
  611.                 radialShFill
  612.             }ifelse
  613.         }if
  614.         /_index _index 1
  615.         _gradType 0 eq{
  616.             add pt
  617.         }{
  618.             sub pt
  619.         }ifelse
  620.     }def
  621. }def
  622. /initializeComposite{
  623.     /bwImage{
  624.         pop /_image load 5 execImage
  625.     }def
  626.     /rampImage{
  627.         _enabledSmoothShade{
  628.             fillRamp
  629.         }{
  630.             _color{
  631.                 _nSamples setImageParms
  632.  
  633.  
  634.                 _rgbRamp{
  635.                     _redData _greenData _blueData _nSamples 3 expandColor
  636.                     true 3 null ncolorimage
  637.                 }{
  638.                     _cyanData _magentaData _yellowData _blackData _nSamples 4 expandColor
  639.                     true 4 null ncolorimage
  640.                 }ifelse
  641.             }{
  642.                 _nSamples setImageParms _blackData null bwImage
  643.             }ifelse
  644.         }ifelse
  645.     }def
  646.     /setCStop{
  647.         /_colorStyle exch pt
  648.         _colorStyle 0 eq{
  649.             1 exch sub
  650.             0 0 0
  651.             4 -1 roll
  652.         }if
  653.  
  654.         _colorStyle 2 eq{
  655.             setrgbcolor 4 npop
  656.         }if
  657.  
  658.         _colorStyle 3 eq{
  659.             1 exch sub /_tmp xp
  660.             pop
  661.             4{
  662.                 _tmp mul 4 1 roll
  663.             }repeat
  664.         }if
  665.  
  666.         _colorStyle 4 eq{
  667.             3 -1 roll pop pop
  668.             1 exch sub /_tmp xp
  669.             3{
  670.                 1 exch sub _tmp mul 1 exch sub 3 1 roll
  671.             }repeat
  672.             setrgbcolor
  673.             4 npop
  674.         }if
  675.         _colorStyle 2 ne _colorStyle 4 ne and{
  676.             null nsetcustomcolor
  677.         }if
  678.     }def
  679.     /nsetcustomcolor
  680.     {
  681.         pop setcmykcolor
  682.     }def
  683.     /nsetcustomcolorend
  684.     {
  685.     }def
  686.     /ncolorimage{
  687.         pop
  688.         /_colorimage load 10 execImage
  689.     }def
  690.     _noImage not _level2PS not and{
  691.         /linealFill{
  692.             8 setImageParms
  693.             _color{
  694.                 currentcmykcolor
  695.                 4{
  696.                     makeByte8 4 1 roll
  697.                 }repeat
  698.                 true 4 null ncolorimage
  699.             }{
  700.                 currentgray makeByte8 null bwImage
  701.             }ifelse
  702.         }def
  703.     }if
  704.     /getRampColorSpace{
  705.         _nSamples 1 gt{
  706.             /_ndx 0 pt
  707.             [blendColor] cvx exec
  708.         }if
  709.         /_C0 [currentcolor] pt
  710.         /_C0_Space currentcolorspace pt
  711.  
  712.         _nSamples 1 gt{
  713.             /_ndx _nSamples 1 sub pt
  714.             [blendColor] cvx exec
  715.         }if
  716.         /_C1 [currentcolor] pt
  717.         /_C1_Space currentcolorspace pt
  718.  
  719.         /_rampColorSpace _C0_Space pt
  720.  
  721.         _spotColor{
  722.             nsetcustomcolorend
  723.         }if
  724.     }def
  725. }def
  726. /npop{
  727.     {pop}repeat
  728. }def
  729. /xd{
  730.     exch def
  731. }def
  732. /nd{
  733.     null def
  734. }def
  735. /pt{
  736.     AGM_Gradient_private 3 1 roll put
  737. }def
  738. /xp{
  739.     exch pt
  740. }def
  741. /xput{
  742.     dup load dup length exch maxlength eq{
  743.         dup dup load dup
  744.         length 2 mul dict copy def
  745.     }if
  746.     load begin
  747.         def
  748.   end
  749. }def
  750. /mySave{
  751.     save /_sSave xp
  752. }def
  753. /myRestore{
  754.     _sSave type /savetype eq{
  755.         _sSave restore
  756.     }if
  757. }def
  758. /gMark{
  759.     counttomark 2 add -1 roll
  760. }def
  761. /execImage{
  762.     /_tmp xp
  763.     {
  764.         exec
  765.     }stopped{
  766.         $error /errorname get /undefinedresult ne{
  767.             stop
  768.         }{
  769.             _tmp npop
  770.         }ifelse
  771.     }if
  772. }def
  773. /pushBSpace{
  774.     newpath gsave
  775.     _bUMatrix astore concat
  776. }def
  777. /popBSpace{
  778.     grestore
  779. }def
  780. /makeByte8{
  781.     /_tmp 0 pt
  782.     255 mul cvi
  783.     8 string 8{
  784.         dup _tmp 3 index put
  785.         /_tmp _tmp 1 add pt
  786.     }repeat
  787.     exch pop
  788. }def
  789. /setImageParms{
  790.     1 8 2 index 0 0 1 0 0 _imageMatrix astore
  791. }def
  792. /linealFill{
  793.     0 0 1 1 rectfill
  794. }def
  795. /testCMYKColorThrough{
  796.     gsave
  797.     setcmykcolor currentcmykcolor
  798.     grestore
  799.     add add add 0 ne
  800. }def
  801. /expandOne    {
  802.     /_tmp xp
  803.     dup type /stringtype ne{
  804.         _tmp string
  805.         exch
  806.         dup 0 ne{
  807.             255 mul cvi
  808.             0 1 _tmp 1 sub{
  809.                 3 copy
  810.                 exch put pop
  811.             }for
  812.         }if
  813.         pop
  814.     }if
  815. }def
  816. /expandColor{
  817.     /_channels xp
  818.     /_len xp
  819.     _channels{
  820.         _len expandOne _channels 1 roll
  821.     }repeat
  822. }def
  823. /blendColor{
  824.  
  825.     _color{
  826.         _rgbRamp _producingSeps not and{
  827.             _redData dup type /stringtype eq{
  828.                 /_ndx cvx /get cvx _d255 /exch cvx /get cvx
  829.             }if
  830.             _greenData dup type /stringtype eq{
  831.                 /_ndx cvx /get cvx _d255 /exch cvx /get cvx
  832.             }if
  833.             _blueData dup type /stringtype eq{
  834.                 /_ndx cvx /get cvx _d255 /exch cvx /get cvx
  835.             }if
  836.             /setrgbcolor cvx
  837.         }{
  838.             _cyanData dup type /stringtype eq{
  839.                 /_ndx cvx /get cvx _d255 /exch cvx /get cvx
  840.             }if
  841.             _magentaData dup type /stringtype eq{
  842.                 /_ndx cvx /get cvx _d255 /exch cvx /get cvx
  843.             }if
  844.             _yellowData dup type /stringtype eq{
  845.                 /_ndx cvx /get cvx _d255 /exch cvx /get cvx
  846.             }if
  847.             _blackData dup type /stringtype eq{
  848.                 /_ndx cvx /get cvx _d255 /exch cvx /get cvx
  849.             }if
  850.  
  851.             _spotColor{
  852.                 _rampSD begin
  853.                     /_rampSD cvx /begin cvx
  854.  
  855.                     spot1 begin
  856.                         tintImage dup type /stringtype eq{
  857.                             /_ndx cvx /get cvx _d255- /exch cvx /get cvx
  858.                         }{
  859.                             dup null ne{
  860.                                 name type /nametype ne{
  861.                                     1 exch sub
  862.                                 }if
  863.                             }if
  864.                         }ifelse
  865.                  end
  866.                     /spot1 cvx /tintValue 3 -1 /roll cvx /put cvx
  867.  
  868.                     spot2 begin
  869.                         tintImage dup type /stringtype eq{
  870.                             /_ndx cvx /get cvx _d255- /exch cvx /get cvx
  871.                         }{
  872.                             dup null ne{
  873.                                 name type /nametype ne{
  874.                                     1 exch sub
  875.                                 }if
  876.                             }if
  877.                         }ifelse
  878.                  end
  879.                     /spot2 cvx /tintValue 3 -1 /roll cvx /put cvx
  880.                     /end cvx
  881.              end
  882.                 /_rampSD cvx
  883.                 /nsetcustomcolor cvx
  884.             }{
  885.                 /setcmykcolor cvx
  886.             }ifelse
  887.         }ifelse
  888.     }{
  889.         _blackData dup type /stringtype eq{
  890.             /_ndx cvx /get cvx _d255 /exch cvx /get cvx
  891.         }if
  892.  
  893.         _enabledSmoothShade{
  894.             1 /exch cvx /sub cvx 0 0 0 4 -1 /roll cvx /setcmykcolor cvx
  895.         }{
  896.              /setgray cvx
  897.         }ifelse
  898.     }ifelse
  899. }def
  900. /useRectImage{
  901.     _subSampleOK _usingSmoothShade not and{
  902.         {
  903.             mark
  904.             0 1 dtransform atan cvi 90 mod 0 eq
  905.             1 0 dtransform atan cvi 90 mod 0 eq
  906.         } stopped
  907.         {
  908.             cleartomark
  909.             false
  910.         }
  911.         {
  912.             and exch pop
  913.         } ifelse
  914.     }{
  915.         false
  916.     }ifelse
  917. }def
  918. /linealImage{
  919.     _noImage{
  920.         rectImage
  921.     }{
  922.         _producingSeps{
  923.                 AGM_Gradient_Sep/AGM_Gradient_Sep_private get
  924.                 /rampImage get exec
  925.         }{
  926.             useRectImage{
  927.                 rectImage
  928.             }{
  929.                 rampImage
  930.             }ifelse
  931.         }ifelse
  932.     }ifelse
  933. }def
  934. /linealRamp{
  935.     pushBSpace
  936.     _ramp{
  937.         linealImage
  938.     }{
  939.         linealFill
  940.     }ifelse
  941.     popBSpace
  942.     /_rampIndex _rampIndex 1 sub pt
  943.     _rampIndex 0 gt{
  944.         getRampData
  945.     }if
  946. }def
  947. /radialGrad{
  948.     /_firstShell true pt
  949.     _enabledSmoothShade not{
  950.         fill
  951.     }if
  952.     pushBSpace
  953.  
  954.     _radHilite{
  955.         _xHi _yHi _bUMatrix idtransform /_yHi xp /_xHi xp
  956.         _rampPoint 1 lt{
  957.             1 _rampPoint sub dup _xHi mul exch _yHi mul translate
  958.         }if
  959.     }if
  960.     _rampIndex{
  961.             radialRamp
  962.         /_rampIndex _rampIndex 1 sub pt
  963.         _rampIndex 0 gt{
  964.             getRampData
  965.         }if
  966.     }repeat
  967.  
  968.     popBSpace
  969.  
  970. }def
  971. /getNSamples{
  972.     0 exch
  973.     {
  974.         dup type /stringtype eq{
  975.             length exch pop exit
  976.         }if
  977.         pop
  978.     }forall
  979.     dup 0 eq{
  980.         pop 1
  981.     }if
  982. }def
  983. /getRampData{
  984.     /_rampType gMark pt
  985.     /_color _rampType 0 gt pt
  986.     /_ccRGB _rampType 5 eq _rampType 6 eq or pt
  987.     /_rgbRamp _rampType 4 eq _ccRGB or pt
  988.     /_ccProcess _rampType 2 eq _rampType 3 eq or pt
  989.     _producingSeps{
  990.         _rampSD initSpotDict
  991.         /_spotColor _ccProcess _ccRGB or pt
  992.     }{
  993.         /_spotColor false pt
  994.     }ifelse
  995.     /_ramp true pt
  996.     100 div /_rampPoint xp
  997.     100 div /_midPoint xp
  998.  
  999.     dup /_colorStyle xp
  1000.     _colorStyle 0 eq{
  1001.         2
  1002.     }{
  1003.         _colorStyle 1 eq{
  1004.             5
  1005.         }{
  1006.             _colorStyle 2 eq{
  1007.                 8
  1008.             }{
  1009.                 _colorStyle 3 eq{
  1010.                     _producingSeps{
  1011.                         _rampSD /spot1 get begin
  1012.                             /name 3 index def
  1013.                             /spot_K 4 index def
  1014.                             /spot_Y 5 index def
  1015.                             /spot_M 6 index def
  1016.                             /spot_C 7 index def
  1017.                      end
  1018.                     }if
  1019.                     7
  1020.                 }{
  1021.                     _producingSeps{
  1022.                         _rampSD/spot1 get begin
  1023.                             /name 4 index def
  1024.                             /spot_K 8 index def
  1025.                             /spot_Y 9 index def
  1026.                             /spot_M 10 index def
  1027.                             /spot_C 11 index def
  1028.                      end
  1029.                     }if
  1030.                     11
  1031.                 } ifelse
  1032.             }ifelse
  1033.         }ifelse
  1034.     }ifelse
  1035.     /_tmp xp
  1036.     _tmp index 100 div /_endPoint xp
  1037.  
  1038.     _gradType 1 eq{
  1039.         _tmp 1 add index 100 div /_midPoint xp
  1040.     }if
  1041.  
  1042.     _producingSeps{
  1043.         _tmp 2 add index /_nextColorStyle xp
  1044.         _nextColorStyle 3 eq{
  1045.             /_tmp _tmp 4 add pt
  1046.             _tmp index dup
  1047.             _rampSD/spot1 get /name get ne{
  1048.                 _rampSD /spot2 get begin
  1049.                     /name xd
  1050.                     /spot_K _tmp 2 add index def
  1051.                     /spot_Y _tmp 3 add index def
  1052.                     /spot_M _tmp 4 add index def
  1053.                     /spot_C _tmp 5 add index def
  1054.              end
  1055.             }{
  1056.                 pop
  1057.             }ifelse
  1058.         }if
  1059.         _nextColorStyle 4 eq{
  1060.             /_tmp _tmp 5 add pt
  1061.             _tmp index dup
  1062.             _rampSD/spot1 get /name get ne{
  1063.                 _rampSD /spot2 get begin
  1064.                     /name xd
  1065.                     /spot_K _tmp 5 add index def
  1066.                     /spot_Y _tmp 6 add index def
  1067.                     /spot_M _tmp 7 add index def
  1068.                     /spot_C _tmp 8 add index def
  1069.              end
  1070.             }{
  1071.                 pop
  1072.             }ifelse
  1073.         }if
  1074.     }if
  1075.     _rampType 3 eq _rampType 6 eq or{
  1076.         /_tint2Data gMark pt
  1077.     }if
  1078.     _ccProcess _ccRGB or{
  1079.         /_tint1Data gMark pt
  1080.     }if
  1081.     _rgbRamp{
  1082.         /_blueData gMark pt
  1083.         /_greenData gMark pt
  1084.         /_redData gMark pt
  1085.     }if
  1086.  
  1087.     _producingSeps{
  1088.         _ccProcess _ccRGB or{
  1089.             _rampType 3 eq _rampType 6 eq or{
  1090.                 _rampSD /spot2 get begin
  1091.                     /tintImage _gradType 0 eq{
  1092.                         _tint2Data
  1093.                     }{
  1094.                         _tint1Data
  1095.                     }ifelse
  1096.                     def
  1097.                     name null eq{
  1098.                         /name /Black def
  1099.                     }if
  1100.              end
  1101.             }if
  1102.             _rampSD /spot1 get begin
  1103.                 /tintImage _gradType 0 eq _rampType 2 eq or _rampType 5 eq or{
  1104.                     _tint1Data
  1105.                 }{
  1106.                     _tint2Data
  1107.                 }ifelse
  1108.                 def
  1109.                 _rampType 2 eq _rampType 5 eq or{
  1110.                     name null eq{
  1111.                         /name _rampSD/spot2 get /name get def
  1112.                         /spot_C _rampSD/spot2 get /spot_C get def
  1113.                         /spot_M _rampSD/spot2 get /spot_M get def
  1114.                         /spot_Y _rampSD/spot2 get /spot_Y get def
  1115.                         /spot_K _rampSD/spot2 get /spot_K get def
  1116.                         _rampSD/spot2 get /name null put
  1117.                     }if
  1118.                 }{
  1119.                     name null eq{
  1120.                         /name /Black def
  1121.                     }if
  1122.                 }ifelse
  1123.          end
  1124.         }if
  1125.     }if
  1126.     /_blackData gMark pt
  1127.     _rampType 0 gt{
  1128.         counttomark 4 add -3 roll
  1129.         /_yellowData xp
  1130.         /_magentaData xp
  1131.         /_cyanData xp
  1132.     }if
  1133.     _ramp{
  1134.         /_nSamples
  1135.             [
  1136.             _rampType 0 eq {_blackData}if
  1137.             _rampType 1 eq {_cyanData _magentaData _yellowData _blackData}if
  1138.             _rampType 2 eq {_cyanData _magentaData _yellowData _blackData _tint1Data}if
  1139.             _rampType 3 eq {_cyanData _magentaData _yellowData _blackData _tint1Data _tint2Data}if
  1140.             _rampType 4 eq {_cyanData _magentaData _yellowData _blackData _redData _greenData _blueData}if
  1141.             _rampType 5 eq {_cyanData _magentaData _yellowData _blackData _redData _greenData _blueData _tint1Data}if
  1142.             _rampType 6 eq {_cyanData _magentaData _yellowData _blackData _redData _greenData _blueData _tint1Data _tint2Data}if
  1143.             ] getNSamples pt
  1144.         _enabledSmoothShade not {/_ramp _nSamples 1 gt pt} if
  1145.     } if
  1146.  
  1147.     setCStop
  1148. }def
  1149. /rectImage{
  1150.     gsave
  1151.     /_sInc 1 pt
  1152.     /_bInc 1 _nSamples div pt
  1153.     /_nSubSamples _nSamples pt
  1154.     /_optimize false pt
  1155.  
  1156.     _subSampleOK{
  1157.         /_uRampLen 1 0 dtransform _dUserSpace idtransform dup mul exch dup mul add sqrt pt
  1158.         /_pChange _uRampLen 0 eq{0}{_nSamples _uRampLen div}ifelse pt
  1159.  
  1160.         _pChange .5 gt dup /_optimize xp{
  1161.             /_nSubSamples _uRampLen 2 div round cvi dup 1 le{pop 2}if pt
  1162.             /_bInc 1 _nSubSamples div pt
  1163.             /_sInc _nSamples 1 sub _nSubSamples 1 sub div pt
  1164.         }if
  1165.     }if
  1166.     0
  1167.     _nSubSamples
  1168.     [
  1169.     /dup cvx
  1170.     _optimize {
  1171.         /round cvx /cvi cvx
  1172.     } if
  1173.     /_ndx /exch cvx /pt cvx
  1174.     blendColor
  1175.     0 0 _bInc 1 /rectfill cvx
  1176.     _bInc 0 /translate cvx
  1177.     _sInc /add cvx
  1178.     ] cvx
  1179.     bind
  1180.     repeat
  1181.     pop
  1182.     _spotColor{
  1183.         nsetcustomcolorend
  1184.     }if
  1185.     grestore
  1186. }def
  1187. /radialInit{
  1188.     /_nRadSamples _nSamples dup 0 eq{pop 1}if pt
  1189.     /_sInc -1 pt
  1190.     /_rampLen _rampPoint _endPoint sub pt
  1191.     /_bInc _rampLen _nSamples div neg pt
  1192.     /_optimize false pt
  1193.     _subSampleOK{
  1194.         /_uRampLen
  1195.             _rampLen 0 dtransform _dUserSpace idtransform dup mul exch dup mul add sqrt
  1196.             0 _rampLen dtransform _dUserSpace idtransform dup mul exch dup mul add sqrt
  1197.             2 copy lt{
  1198.                 exch
  1199.             }if pop
  1200.         pt
  1201.         /_pChange
  1202.             _uRampLen 0 eq{
  1203.                 0
  1204.             }{
  1205.                 _nSamples _uRampLen div
  1206.             }ifelse
  1207.         pt
  1208.         _pChange .5 gt dup /_optimize xp{
  1209.             /_nRadSamples _uRampLen 2 div round cvi dup 1 le{pop 2}if pt
  1210.             /_bInc _rampLen _nRadSamples div neg pt
  1211.             /_sInc _nSamples 1 sub _nRadSamples 1 sub div neg pt
  1212.         }if
  1213.     }if
  1214.     _radHilite{
  1215.         /_xBCInc _xHi _rampLen mul _nRadSamples div pt
  1216.         /_yBCInc _yHi _rampLen mul _nRadSamples div pt
  1217.     }if
  1218. }def
  1219. /radialRamp{
  1220.     _enabledSmoothShade{
  1221.         fillRamp
  1222.     }{
  1223.         /_saveMatrix _saveMatrix currentmatrix def
  1224.  
  1225.         radialInit
  1226.  
  1227.         true
  1228.         _producingSeps{
  1229.             _nSamples 1 gt{
  1230.                 pop
  1231.                 /_ndx 0 pt
  1232.                 [blendColor] cvx exec
  1233.                 currentInkN
  1234.                 /_ndx _nSamples 1 sub pt
  1235.                 [blendColor] cvx exec
  1236.                 currentInkN
  1237.                 or
  1238.             }if
  1239.         }if
  1240.         {
  1241.             _rampPoint
  1242.  
  1243.             _nSamples 1 sub
  1244.  
  1245.             _nRadSamples
  1246.             [
  1247.                 /dup cvx
  1248.  
  1249.                 _optimize{
  1250.                     /round cvx /cvi cvx
  1251.                 }if
  1252.  
  1253.                 /_ndx /exch cvx /pt cvx
  1254.  
  1255.                 _useShells{
  1256.                     /_firstShell cvx{
  1257.                         /_firstShell false pt
  1258.                     }{
  1259.                         0 0 3 index 360 0 arcn fill
  1260.                     }/ifelse cvx
  1261.                 }if
  1262.  
  1263.                 blendColor
  1264.  
  1265.                 _useShells{
  1266.                     0 0 3 /index cvx 0 360 /arc cvx
  1267.                 }{
  1268.                     0 0 3 /index cvx 0 360 /arc cvx /fill cvx
  1269.                 }ifelse
  1270.  
  1271.                 /exch cvx _bInc /add cvx /exch cvx
  1272.  
  1273.                 _sInc /add cvx
  1274.  
  1275.                 _radHilite{
  1276.                     _xBCInc _yBCInc /translate cvx
  1277.                 }if
  1278.             ] cvx bind
  1279.             repeat
  1280.  
  1281.             pop pop
  1282.         }{
  1283.             _useShells{
  1284.                 0 0 _rampPoint 360 0 arcn fill
  1285.             }if
  1286.         }ifelse
  1287.  
  1288.         _saveMatrix setmatrix
  1289.  
  1290.         _radHilite{
  1291.             _xHi _rampLen mul _yHi _rampLen mul translate
  1292.         }if
  1293.  
  1294.         _useShells _rampIndex 1 eq and{
  1295.             fill
  1296.         }if
  1297.  
  1298.         _spotColor{
  1299.             nsetcustomcolorend
  1300.         }if
  1301.     }ifelse
  1302. }def
  1303. end
  1304. end
  1305. defaultpacking setpacking
  1306. %%EndResource